﻿<!--
	========================================================================
	 awzBoxes Library
	
	 Homepage: http://www.awzhome.de/
	========================================================================
	
	This Source Code Form is subject to the terms of the Mozilla Public
	License, v. 2.0. If a copy of the MPL was not distributed with this
	file, You can obtain one at http://mozilla.org/MPL/2.0/.
   
	The Original Code is code of awzBoxes Library.

	The Initial Developer of the Original Code is Andreas Weizel.
	Portions created by the Initial Developer are
	Copyright (C) 2011-2012 Andreas Weizel. All Rights Reserved.
	
	Contributor(s): (none)
	
	========================================================================
-->

<UserControl x:Class="AWZhome.awzBoxes.Tools.DragOverlayBox"
				 xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
				 xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
				 xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
				 xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
				 xmlns:box="clr-namespace:AWZhome.awzBoxes"
				 xmlns:boxt="clr-namespace:AWZhome.awzBoxes.Tools"
				 mc:Ignorable="d" 
				 VerticalAlignment="Center" HorizontalAlignment="Center"
				 AllowDrop="True"
				 DragEnter="UserControl_DragEnter"
				 DragLeave="UserControl_DragLeave"
				 Drop="UserControl_Drop"
				 d:DesignHeight="300" d:DesignWidth="300">

	<UserControl.Resources>
		<BooleanToVisibilityConverter x:Key="BooleanToVisibilityConverter" />
	</UserControl.Resources>

	<!--<UserControl.Background>
		<LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
			<GradientStop Color="#FFFFFFFF" Offset="0"/>
			<GradientStop Color="{x:Static SystemColors.HighlightColor}" Offset="1"/>
		</LinearGradientBrush>
	</UserControl.Background>-->

	<Grid x:Name="InnerGrid" VerticalAlignment="Center" HorizontalAlignment="Center">
		<Grid.ColumnDefinitions>
			<ColumnDefinition Width="42" />
			<ColumnDefinition Width="32" />
			<ColumnDefinition Width="32" />
			<ColumnDefinition Width="32" />
			<ColumnDefinition Width="42" />
		</Grid.ColumnDefinitions>
		<Grid.RowDefinitions>
			<RowDefinition Height="42" />
			<RowDefinition Height="32" />
			<RowDefinition Height="32" />
			<RowDefinition Height="32" />
			<RowDefinition Height="42" />
		</Grid.RowDefinitions>

		<Rectangle Grid.Column="0" Grid.Row="0" Height="32" Width="32" />
		<Rectangle Grid.Column="1" Grid.Row="0" Height="32" Width="32" />
		<Image Grid.Column="2" Grid.Row="0" Height="32" Width="32" x:Name="OuterTopDropArea"
				 Source="../Images/DragOuterTop.png" VerticalAlignment="Top" HorizontalAlignment="Center"
				 Visibility="{Binding Path=AllowOuterTopDrop, Converter={StaticResource BooleanToVisibilityConverter}}" />
		<Rectangle Grid.Column="3" Grid.Row="0" Height="32" Width="32" />
		<Rectangle Grid.Column="4" Grid.Row="0" Height="32" Width="32" />

		<Rectangle Grid.Column="0" Grid.Row="1" Height="32" Width="32" />
		<Rectangle Grid.Column="1" Grid.Row="1" Height="32" Width="32" />
		<Image Grid.Column="2" Grid.Row="1" Height="32" Width="32" x:Name="TopDropArea"
				 Source="../Images/DragInnerTop.png"
				 HorizontalAlignment="Center" VerticalAlignment="Center"
				 Visibility="{Binding Path=AllowInnerTopDrop, Converter={StaticResource BooleanToVisibilityConverter}}" />
		<Rectangle Grid.Column="3" Grid.Row="1" Height="32" Width="32" />
		<Rectangle Grid.Column="4" Grid.Row="1" Height="32" Width="32" />

		<Image Grid.Column="0" Grid.Row="2" Height="32" Width="32" x:Name="OuterLeftDropArea"
				 Source="../Images/DragOuterLeft.png" HorizontalAlignment="Left" VerticalAlignment="Center"
				 Visibility="{Binding Path=AllowOuterLeftDrop, Converter={StaticResource BooleanToVisibilityConverter}}" />
		<Image Grid.Column="1" Grid.Row="2" Height="32" Width="32" x:Name="LeftDropArea"
				 Source="../Images/DragInnerLeft.png"
				 HorizontalAlignment="Center" VerticalAlignment="Center"
				 Visibility="{Binding Path=AllowInnerLeftDrop, Converter={StaticResource BooleanToVisibilityConverter}}" />
		<Image Grid.Column="2" Grid.Row="2" Height="32" Width="32" x:Name="InnerDropArea"
				 Source="../Images/DragMiddle.png" HorizontalAlignment="Center" VerticalAlignment="Center"
				 Visibility="{Binding Path=AllowInnerDrop, Converter={StaticResource BooleanToVisibilityConverter}}" />
		<Image Grid.Column="3" Grid.Row="2" Height="32" Width="32" x:Name="RightDropArea"
				 Source="../Images/DragInnerRight.png"
				 HorizontalAlignment="Center" VerticalAlignment="Center"
				 Visibility="{Binding Path=AllowInnerRightDrop, Converter={StaticResource BooleanToVisibilityConverter}}" />
		<Image Grid.Column="4" Grid.Row="2" Height="32" Width="32" x:Name="OuterRightDropArea"
				 Source="../Images/DragOuterRight.png" HorizontalAlignment="Right" VerticalAlignment="Center"
				 Visibility="{Binding Path=AllowOuterRightDrop, Converter={StaticResource BooleanToVisibilityConverter}}" />

		<Rectangle Grid.Column="0" Grid.Row="3" Height="32" Width="32" />
		<Rectangle Grid.Column="1" Grid.Row="3" Height="32" Width="32" />
		<Image Grid.Column="2" Grid.Row="3" Height="32" Width="32" x:Name="BottomDropArea"
				 Source="../Images/DragInnerBottom.png"
				 HorizontalAlignment="Center" VerticalAlignment="Center"
				 Visibility="{Binding Path=AllowInnerBottomDrop, Converter={StaticResource BooleanToVisibilityConverter}}" />
		<Rectangle Grid.Column="3" Grid.Row="3" Height="32" Width="32" />
		<Rectangle Grid.Column="4" Grid.Row="3" Height="32" Width="32" />

		<Rectangle Grid.Column="0" Grid.Row="4" Height="32" Width="32" />
		<Rectangle Grid.Column="1" Grid.Row="4" Height="32" Width="32" />
		<Image Grid.Column="2" Grid.Row="4" Height="32" Width="32" x:Name="OuterBottomDropArea"
				 Source="../Images/DragOuterBottom.png" VerticalAlignment="Bottom" HorizontalAlignment="Center"
				 Visibility="{Binding Path=AllowOuterBottomDrop, Converter={StaticResource BooleanToVisibilityConverter}}" />
		<Rectangle Grid.Column="3" Grid.Row="4" Height="32" Width="32" />
		<Rectangle Grid.Column="4" Grid.Row="4" Height="32" Width="32" />
	</Grid>
</UserControl>
